package tx.bj12320.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import tx.bj12320.model.*;
import tx.bj12320.dao.*;
import tx.bj12320.service.*;
import tx.bj12320.vo.query.*;

@Service
@Transactional
public class UserInfoManager extends BaseManager<UserInfo,Long>{

	private UserInfoDao userInfoDao;
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	public void setUserInfoDao(UserInfoDao dao) {
		this.userInfoDao = dao;
	}
	public EntityDao getEntityDao() {
		return this.userInfoDao;
	}

	@Transactional(readOnly=true)
	public Page findPage(UserInfoQuery query) {
		return userInfoDao.findPage(query);
	}
	@Transactional(readOnly=true)
	public UserInfo getByUsername(String userName) {
		return userInfoDao.findByProperty("userName", userName);
	}
	@Transactional(readOnly=true)
	public List<UserInfo> findAllBySysUserType(String sysUserType) {
		return userInfoDao.findAllBy("sysUserType", sysUserType);
	}
	@Transactional(readOnly=true)
	public UserInfo getByUserCode(String userCode) {
		return userInfoDao.findByProperty("userCode", userCode);
	}
	@Transactional(readOnly=true)
	public List<UserInfo> findAllWithSellPhoneIsNotNull(UserInfoQuery query) {
		return userInfoDao.findAllWithSellPhoneIsNotNull(query);
	}

}
